package com.game.league.task.detail.adapter;

import android.app.Activity;
import android.text.TextUtils;

import com.game.base.app.base.BaseAdapter;
import com.game.base.app.callback.ItemOnClick;
import com.game.base.glideV4.ImageLoader;
import com.game.league.R;
import com.game.league.databinding.AdapterUploadImgBinding;

/**
 * Created by Su on 2019/6/7.
 */
public class UploadImgAdapter extends BaseAdapter<String, AdapterUploadImgBinding> {

    public UploadImgAdapter(Activity activity, ItemOnClick itemOnClick) {
        super(activity, itemOnClick);
    }

    @Override
    protected int getLayoutResId(int viewType) {
        return R.layout.adapter_upload_img;
    }

    @Override
    protected void onBindItem(AdapterUploadImgBinding binding, String item, int position) {
        if (!TextUtils.isEmpty(item)) {
            ImageLoader.loadRoundCenterCrop(mActivity, item, binding.ivImage);
        }
    }
}
